package MementoPattern;

import java.util.ArrayList;
import java.util.List;

/**
 * @version: java version 1.8
 * @Author: Zheng
 * @description:
 * @date: 2022-08-23 22:39
 */
public class CareTaker {

    private List<Memento> mementos=new ArrayList<Memento>();

    public void add(Memento state){
        mementos.add(state);
    }

    public Memento get(int index){
        return mementos.get(index);
    }
}
